from django.db import models

# Create your models here.
class BookInfo(models.Model):
    name = models.CharField(max_length=64)
    pub_date = models.DateField(null=True)
    readcount = models.IntegerField(default=0)
    commitcount = models.IntegerField(default=0)
    del_flag = models.BooleanField(default=False)
    class Meta:
        db_table = 'book_info'

class PeopleInfo(models.Model):
    name = models.CharField(max_length=24)
    gender = models.BooleanField()
    des = models.CharField(max_length=1024)
    del_flag = models.BooleanField(default=False)
    book = models.ForeignKey(BookInfo, on_delete=models.CASCADE)

    class Meta:
        db_table = 'people_info'